package cn.txauction.business.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import cn.txauction.business.dao.IAdminDao;
import cn.txauction.business.dao.base.BaseDao;
import cn.txauction.modal.TxAdmins;

@Repository("adminDao")
public class AdminDaoImpl extends BaseDao<TxAdmins> implements IAdminDao {
	public TxAdmins adminLogin(TxAdmins admin){
		List<TxAdmins> list = getHibernateTemplate().find("from TxAdmins a where a.fdAdminname=? and a.fdPassword=?", new Object[]{admin.getFdAdminname(), admin.getFdPassword()});
		if(list!=null && list.size() > 0)
			return list.get(0);
		return null;
	}
}
